@echo off

SET YILI_HOME=%~dp0

git checkout -b dev origin/dev
git pull
git submodule init
git submodule update
git submodule update --init --recursive

for %%I in (config-service,eureka,message,one-service\admin-service,one-service\crm-service,one-service\file-service,one-service\login-service,one-service\user-service,one-service\wechat-service,one-web\admin-pc,one-web\crm-api,one-web\crm-pc,one-web\file-api,one-web\user-api,one-web\wechat-api,zuul) do call:switchGitBranch %%I

:switchGitBranch
SET PROJECT_HOME=%YILI_HOME%%~1
echo "%PROJECT_HOME%"
cd %PROJECT_HOME%
git checkout dev
git pull
goto:eof